.class public Lcom/android/inputmethod/latin/LatinKeyboard;
.super Landroid/inputmethodservice/Keyboard;
.source "LatinKeyboard.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/android/inputmethod/latin/LatinKeyboard$SlidingLocaleDrawable;,
        Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;
    }
.end annotation


# static fields
.field private static final DEBUG_PREFERRED_LETTER:Z = false

.field private static final OVERLAP_PERCENTAGE_HIGH_PROB:F = 0.85f

.field private static final OVERLAP_PERCENTAGE_LOW_PROB:F = 0.7f

.field private static final SHIFT_LOCKED:I = 0x2

.field private static final SHIFT_OFF:I = 0x0

.field private static final SHIFT_ON:I = 0x1

.field private static final SPACEBAR_DRAG_THRESHOLD:F = 0.8f

.field private static final TAG:Ljava/lang/String; = "LatinKeyboard"

.field static sSpacebarVerticalCorrection:I


# instance fields
.field private mBounds:Landroid/graphics/Rect;

.field private mButtonArrowLeftIcon:Landroid/graphics/drawable/Drawable;

.field private mButtonArrowRightIcon:Landroid/graphics/drawable/Drawable;

.field private mContext:Landroid/content/Context;

.field private mCurrentlyInSpace:Z

.field private mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

.field private mExtensionResId:I

.field private mIsAlphaKeyboard:Z

.field private mLanguageSwitcher:Lcom/android/inputmethod/latin/LanguageSwitcher;

.field mLocale:Ljava/util/Locale;

.field private mMode:I

.field private mOldShiftIcon:Landroid/graphics/drawable/Drawable;

.field private mOldShiftPreviewIcon:Landroid/graphics/drawable/Drawable;

.field private mPreemptiveCorrection:Z

.field private mPrefDistance:I

.field private mPrefLetter:I

.field private mPrefLetterFrequencies:[I

.field private mPrefLetterX:I

.field private mPrefLetterY:I

.field private mRes:Landroid/content/res/Resources;

.field private mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

.field private mShiftLockIcon:Landroid/graphics/drawable/Drawable;

.field private mShiftLockPreviewIcon:Landroid/graphics/drawable/Drawable;

.field private mShiftState:I

.field private mSlidingLocaleIcon:Lcom/android/inputmethod/latin/LatinKeyboard$SlidingLocaleDrawable;

.field private mSpaceDragLastDiff:I

.field private mSpaceDragStartX:I

.field private mSpaceIcon:Landroid/graphics/drawable/Drawable;

.field private mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

.field private mSpaceKeyIndex:I

.field private mSpaceKeyMoveINFlag:Z

.field private mSpacePreviewIcon:Landroid/graphics/drawable/Drawable;

.field private mSpaceSupportSwitch:Z


# direct methods
.method public constructor <init>(Landroid/content/Context;I)V
    .locals 1
    .parameter "context"
    .parameter "xmlLayoutResId"

    .prologue
    .line 94
    const/4 v0, 0x0

    invoke-direct {p0, p1, p2, v0}, Lcom/android/inputmethod/latin/LatinKeyboard;-><init>(Landroid/content/Context;II)V

    .line 95
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;II)V
    .locals 5
    .parameter "context"
    .parameter "xmlLayoutResId"
    .parameter "mode"

    .prologue
    const/4 v4, 0x0

    .line 98
    invoke-direct {p0, p1, p2, p3}, Landroid/inputmethodservice/Keyboard;-><init>(Landroid/content/Context;II)V

    .line 58
    const/4 v1, -0x1

    iput v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKeyIndex:I

    .line 71
    new-instance v1, Landroid/graphics/Rect;

    invoke-direct {v1}, Landroid/graphics/Rect;-><init>()V

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mBounds:Landroid/graphics/Rect;

    .line 85
    iput v4, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    .line 420
    iput-boolean v4, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKeyMoveINFlag:Z

    .line 99
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    .line 100
    .local v0, res:Landroid/content/res/Resources;
    iput-object p1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mContext:Landroid/content/Context;

    .line 101
    iput p3, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mMode:I

    .line 102
    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mRes:Landroid/content/res/Resources;

    .line 103
    const v1, 0x7f020073

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftLockIcon:Landroid/graphics/drawable/Drawable;

    .line 104
    const v1, 0x7f02005d

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftLockPreviewIcon:Landroid/graphics/drawable/Drawable;

    .line 105
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftLockPreviewIcon:Landroid/graphics/drawable/Drawable;

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftLockPreviewIcon:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v2}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v2

    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftLockPreviewIcon:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v3}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v3

    invoke-virtual {v1, v4, v4, v2, v3}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 108
    const v1, 0x7f020074

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceIcon:Landroid/graphics/drawable/Drawable;

    .line 109
    const v1, 0x7f02005e

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpacePreviewIcon:Landroid/graphics/drawable/Drawable;

    .line 110
    const v1, 0x7f02005f

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mButtonArrowLeftIcon:Landroid/graphics/drawable/Drawable;

    .line 111
    const v1, 0x7f020060

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mButtonArrowRightIcon:Landroid/graphics/drawable/Drawable;

    .line 112
    const v1, 0x7f090003

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelOffset(I)I

    move-result v1

    sput v1, Lcom/android/inputmethod/latin/LatinKeyboard;->sSpacebarVerticalCorrection:I

    .line 114
    const/16 v1, 0x20

    invoke-direct {p0, v1}, Lcom/android/inputmethod/latin/LatinKeyboard;->indexOf(I)I

    move-result v1

    iput v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKeyIndex:I

    .line 116
    const v1, 0x7f040006

    if-eq p2, v1, :cond_0

    const v1, 0x7f040007

    if-eq p2, v1, :cond_0

    const v1, 0x7f040008

    if-ne p2, v1, :cond_1

    :cond_0
    const/4 v1, 0x1

    :goto_0
    iput-boolean v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceSupportSwitch:Z

    .line 120
    return-void

    :cond_1
    move v1, v4

    .line 116
    goto :goto_0
.end method

.method public constructor <init>(Landroid/content/Context;ILjava/lang/CharSequence;II)V
    .locals 2
    .parameter "context"
    .parameter "layoutTemplateResId"
    .parameter "characters"
    .parameter "columns"
    .parameter "horizontalPadding"

    .prologue
    const/4 v1, 0x0

    .line 124
    invoke-direct/range {p0 .. p5}, Landroid/inputmethodservice/Keyboard;-><init>(Landroid/content/Context;ILjava/lang/CharSequence;II)V

    .line 58
    const/4 v0, -0x1

    iput v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKeyIndex:I

    .line 71
    new-instance v0, Landroid/graphics/Rect;

    invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mBounds:Landroid/graphics/Rect;

    .line 85
    iput v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    .line 420
    iput-boolean v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKeyMoveINFlag:Z

    .line 125
    return-void
.end method

.method static synthetic access$000(Lcom/android/inputmethod/latin/LatinKeyboard;II)I
    .locals 1
    .parameter "x0"
    .parameter "x1"
    .parameter "x2"

    .prologue
    .line 42
    invoke-direct {p0, p1, p2}, Lcom/android/inputmethod/latin/LatinKeyboard;->getTextSizeFromTheme(II)I

    move-result v0

    return v0
.end method

.method static synthetic access$100(Lcom/android/inputmethod/latin/LatinKeyboard;)Landroid/content/res/Resources;
    .locals 1
    .parameter "x0"

    .prologue
    .line 42
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mRes:Landroid/content/res/Resources;

    return-object v0
.end method

.method static synthetic access$200(Lcom/android/inputmethod/latin/LatinKeyboard;)Landroid/content/Context;
    .locals 1
    .parameter "x0"

    .prologue
    .line 42
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic access$300(Lcom/android/inputmethod/latin/LatinKeyboard;ILandroid/graphics/Paint;)Ljava/lang/String;
    .locals 1
    .parameter "x0"
    .parameter "x1"
    .parameter "x2"

    .prologue
    .line 42
    invoke-direct {p0, p1, p2}, Lcom/android/inputmethod/latin/LatinKeyboard;->getInputLanguage(ILandroid/graphics/Paint;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$400(Lcom/android/inputmethod/latin/LatinKeyboard;ILandroid/graphics/Paint;)Ljava/lang/String;
    .locals 1
    .parameter "x0"
    .parameter "x1"
    .parameter "x2"

    .prologue
    .line 42
    invoke-direct {p0, p1, p2}, Lcom/android/inputmethod/latin/LatinKeyboard;->getNextInputLanguage(ILandroid/graphics/Paint;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$500(Lcom/android/inputmethod/latin/LatinKeyboard;ILandroid/graphics/Paint;)Ljava/lang/String;
    .locals 1
    .parameter "x0"
    .parameter "x1"
    .parameter "x2"

    .prologue
    .line 42
    invoke-direct {p0, p1, p2}, Lcom/android/inputmethod/latin/LatinKeyboard;->getPrevInputLanguage(ILandroid/graphics/Paint;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private chooseDisplayName(Ljava/util/Locale;ILandroid/graphics/Paint;)Ljava/lang/String;
    .locals 4
    .parameter "locale"
    .parameter "widthAvail"
    .parameter "paint"

    .prologue
    .line 343
    const-wide/high16 v0, 0x3fd0

    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboard;->getMinWidth()I

    move-result v2

    int-to-double v2, v2

    mul-double/2addr v0, v2

    double-to-int v0, v0

    if-ge p2, v0, :cond_0

    .line 344
    invoke-virtual {p1}, Ljava/util/Locale;->getLanguage()Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x0

    const/4 v2, 0x2

    invoke-virtual {v0, v1, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/android/inputmethod/latin/LanguageSwitcher;->toTitleCase(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 346
    :goto_0
    return-object v0

    :cond_0
    invoke-virtual {p1, p1}, Ljava/util/Locale;->getDisplayLanguage(Ljava/util/Locale;)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/android/inputmethod/latin/LanguageSwitcher;->toTitleCase(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method private distanceFrom(Landroid/inputmethodservice/Keyboard$Key;II)I
    .locals 2
    .parameter "k"
    .parameter "x"
    .parameter "y"

    .prologue
    .line 545
    iget v0, p1, Landroid/inputmethodservice/Keyboard$Key;->y:I

    if-le p3, v0, :cond_0

    iget v0, p1, Landroid/inputmethodservice/Keyboard$Key;->y:I

    iget v1, p1, Landroid/inputmethodservice/Keyboard$Key;->height:I

    add-int/2addr v0, v1

    if-ge p3, v0, :cond_0

    .line 546
    iget v0, p1, Landroid/inputmethodservice/Keyboard$Key;->x:I

    iget v1, p1, Landroid/inputmethodservice/Keyboard$Key;->width:I

    div-int/lit8 v1, v1, 0x2

    add-int/2addr v0, v1

    sub-int/2addr v0, p2

    invoke-static {v0}, Ljava/lang/Math;->abs(I)I

    move-result v0

    .line 548
    :goto_0
    return v0

    :cond_0
    const v0, 0x7fffffff

    goto :goto_0
.end method

.method private drawButtonArrow(Landroid/graphics/drawable/Drawable;Landroid/graphics/Canvas;II)V
    .locals 2
    .parameter "arrow"
    .parameter "canvas"
    .parameter "x"
    .parameter "bottomY"

    .prologue
    .line 325
    invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v0

    sub-int v0, p4, v0

    invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v1

    add-int/2addr v1, p3

    invoke-virtual {p1, p3, v0, v1, p4}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 327
    invoke-virtual {p1, p2}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V

    .line 328
    return-void
.end method

.method private drawSpaceBar(Landroid/graphics/Canvas;III)V
    .locals 10
    .parameter "canvas"
    .parameter "width"
    .parameter "height"
    .parameter "opacity"

    .prologue
    const/4 v9, 0x0

    const/4 v8, 0x1

    .line 288
    sget-object v6, Landroid/graphics/PorterDuff$Mode;->CLEAR:Landroid/graphics/PorterDuff$Mode;

    invoke-virtual {p1, v9, v6}, Landroid/graphics/Canvas;->drawColor(ILandroid/graphics/PorterDuff$Mode;)V

    .line 289
    new-instance v3, Landroid/graphics/Paint;

    invoke-direct {v3}, Landroid/graphics/Paint;-><init>()V

    .line 290
    .local v3, paint:Landroid/graphics/Paint;
    invoke-virtual {v3, v8}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 291
    invoke-virtual {v3, p4}, Landroid/graphics/Paint;->setAlpha(I)V

    .line 293
    const v6, 0x1030046

    const/16 v7, 0xe

    invoke-direct {p0, v6, v7}, Lcom/android/inputmethod/latin/LatinKeyboard;->getTextSizeFromTheme(II)I

    move-result v6

    int-to-float v6, v6

    invoke-virtual {v3, v6}, Landroid/graphics/Paint;->setTextSize(F)V

    .line 294
    sget-object v6, Landroid/graphics/Paint$Align;->CENTER:Landroid/graphics/Paint$Align;

    invoke-virtual {v3, v6}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    .line 297
    iget-object v6, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    iget v6, v6, Landroid/inputmethodservice/Keyboard$Key;->width:I

    invoke-direct {p0, v6, v3}, Lcom/android/inputmethod/latin/LatinKeyboard;->getInputLanguage(ILandroid/graphics/Paint;)Ljava/lang/String;

    move-result-object v2

    .line 298
    .local v2, language:Ljava/lang/String;
    invoke-virtual {v3}, Landroid/graphics/Paint;->ascent()F

    move-result v6

    neg-float v6, v6

    float-to-int v0, v6

    .line 299
    .local v0, ascent:I
    const/high16 v6, -0x8000

    invoke-virtual {v3, v6}, Landroid/graphics/Paint;->setColor(I)V

    .line 300
    div-int/lit8 v6, p2, 0x2

    int-to-float v6, v6

    sub-int v7, v0, v8

    int-to-float v7, v7

    invoke-virtual {p1, v2, v6, v7, v3}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 302
    const v6, -0x7f7f80

    invoke-virtual {v3, v6}, Landroid/graphics/Paint;->setColor(I)V

    .line 303
    div-int/lit8 v6, p2, 0x2

    int-to-float v6, v6

    int-to-float v7, v0

    invoke-virtual {p1, v2, v6, v7, v3}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 306
    iget-object v6, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mLanguageSwitcher:Lcom/android/inputmethod/latin/LanguageSwitcher;

    invoke-virtual {v6}, Lcom/android/inputmethod/latin/LanguageSwitcher;->getLocaleCount()I

    move-result v6

    if-le v6, v8, :cond_0

    .line 307
    new-instance v1, Landroid/graphics/Rect;

    invoke-direct {v1}, Landroid/graphics/Rect;-><init>()V

    .line 308
    .local v1, bounds:Landroid/graphics/Rect;
    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v6

    invoke-virtual {v3, v2, v9, v6, v1}, Landroid/graphics/Paint;->getTextBounds(Ljava/lang/String;IILandroid/graphics/Rect;)V

    .line 309
    iget-object v6, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mButtonArrowLeftIcon:Landroid/graphics/drawable/Drawable;

    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    iget v7, v7, Landroid/inputmethodservice/Keyboard$Key;->width:I

    iget v8, v1, Landroid/graphics/Rect;->right:I

    sub-int/2addr v7, v8

    div-int/lit8 v7, v7, 0x2

    iget-object v8, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mButtonArrowLeftIcon:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v8}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v8

    sub-int/2addr v7, v8

    invoke-virtual {v3}, Landroid/graphics/Paint;->getTextSize()F

    move-result v8

    float-to-int v8, v8

    invoke-direct {p0, v6, p1, v7, v8}, Lcom/android/inputmethod/latin/LatinKeyboard;->drawButtonArrow(Landroid/graphics/drawable/Drawable;Landroid/graphics/Canvas;II)V

    .line 313
    iget-object v6, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mButtonArrowRightIcon:Landroid/graphics/drawable/Drawable;

    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    iget v7, v7, Landroid/inputmethodservice/Keyboard$Key;->width:I

    iget v8, v1, Landroid/graphics/Rect;->right:I

    add-int/2addr v7, v8

    div-int/lit8 v7, v7, 0x2

    invoke-virtual {v3}, Landroid/graphics/Paint;->getTextSize()F

    move-result v8

    float-to-int v8, v8

    invoke-direct {p0, v6, p1, v7, v8}, Lcom/android/inputmethod/latin/LatinKeyboard;->drawButtonArrow(Landroid/graphics/drawable/Drawable;Landroid/graphics/Canvas;II)V

    .line 317
    .end local v1           #bounds:Landroid/graphics/Rect;
    :cond_0
    iget-object v6, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceIcon:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v6}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v6

    sub-int v6, p2, v6

    div-int/lit8 v4, v6, 0x2

    .line 318
    .local v4, x:I
    iget-object v6, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceIcon:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v6}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v6

    sub-int v5, p3, v6

    .line 319
    .local v5, y:I
    iget-object v6, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceIcon:Landroid/graphics/drawable/Drawable;

    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceIcon:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v7}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v7

    add-int/2addr v7, v4

    iget-object v8, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceIcon:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v8}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v8

    add-int/2addr v8, v5

    invoke-virtual {v6, v4, v5, v7, v8}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 321
    iget-object v6, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceIcon:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v6, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V

    .line 322
    return-void
.end method

.method private getInputLanguage(ILandroid/graphics/Paint;)Ljava/lang/String;
    .locals 1
    .parameter "widthAvail"
    .parameter "paint"

    .prologue
    .line 331
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mLanguageSwitcher:Lcom/android/inputmethod/latin/LanguageSwitcher;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LanguageSwitcher;->getInputLocale()Ljava/util/Locale;

    move-result-object v0

    invoke-direct {p0, v0, p1, p2}, Lcom/android/inputmethod/latin/LatinKeyboard;->chooseDisplayName(Ljava/util/Locale;ILandroid/graphics/Paint;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private getNextInputLanguage(ILandroid/graphics/Paint;)Ljava/lang/String;
    .locals 1
    .parameter "widthAvail"
    .parameter "paint"

    .prologue
    .line 335
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mLanguageSwitcher:Lcom/android/inputmethod/latin/LanguageSwitcher;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LanguageSwitcher;->getNextInputLocale()Ljava/util/Locale;

    move-result-object v0

    invoke-direct {p0, v0, p1, p2}, Lcom/android/inputmethod/latin/LatinKeyboard;->chooseDisplayName(Ljava/util/Locale;ILandroid/graphics/Paint;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private getPrevInputLanguage(ILandroid/graphics/Paint;)Ljava/lang/String;
    .locals 1
    .parameter "widthAvail"
    .parameter "paint"

    .prologue
    .line 339
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mLanguageSwitcher:Lcom/android/inputmethod/latin/LanguageSwitcher;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LanguageSwitcher;->getPrevInputLocale()Ljava/util/Locale;

    move-result-object v0

    invoke-direct {p0, v0, p1, p2}, Lcom/android/inputmethod/latin/LatinKeyboard;->chooseDisplayName(Ljava/util/Locale;ILandroid/graphics/Paint;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private getTextSizeFromTheme(II)I
    .locals 6
    .parameter "style"
    .parameter "defValue"

    .prologue
    const/4 v5, 0x0

    .line 571
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mContext:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme;

    move-result-object v2

    const/4 v3, 0x1

    new-array v3, v3, [I

    const v4, 0x1010095

    aput v4, v3, v5

    invoke-virtual {v2, p1, v3}, Landroid/content/res/Resources$Theme;->obtainStyledAttributes(I[I)Landroid/content/res/TypedArray;

    move-result-object v0

    .line 573
    .local v0, array:Landroid/content/res/TypedArray;
    invoke-virtual {v0, v5, v5}, Landroid/content/res/TypedArray;->getResourceId(II)I

    move-result v2

    invoke-virtual {v0, v2, p2}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I

    move-result v1

    .line 574
    .local v1, textSize:I
    return v1
.end method

.method private inPrefList(I[I)Z
    .locals 2
    .parameter "code"
    .parameter "pref"

    .prologue
    const/4 v1, 0x0

    .line 540
    array-length v0, p2

    if-ge p1, v0, :cond_1

    if-ltz p1, :cond_1

    aget v0, p2, p1

    if-lez v0, :cond_0

    const/4 v0, 0x1

    .line 541
    :goto_0
    return v0

    :cond_0
    move v0, v1

    .line 540
    goto :goto_0

    :cond_1
    move v0, v1

    .line 541
    goto :goto_0
.end method

.method private indexOf(I)I
    .locals 5
    .parameter "code"

    .prologue
    .line 562
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboard;->getKeys()Ljava/util/List;

    move-result-object v2

    .line 563
    .local v2, keys:Ljava/util/List;,"Ljava/util/List<Landroid/inputmethodservice/Keyboard$Key;>;"
    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v0

    .line 564
    .local v0, count:I
    const/4 v1, 0x0

    .end local p0
    .local v1, i:I
    :goto_0
    if-ge v1, v0, :cond_1

    .line 565
    invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Landroid/inputmethodservice/Keyboard$Key;

    iget-object v3, p0, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    const/4 v4, 0x0

    aget v3, v3, v4

    if-ne v3, p1, :cond_0

    move v3, v1

    .line 567
    :goto_1
    return v3

    .line 564
    :cond_0
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 567
    :cond_1
    const/4 v3, -0x1

    goto :goto_1
.end method

.method private updateLocaleDrag(I)V
    .locals 5
    .parameter "diff"

    .prologue
    const/4 v4, 0x0

    .line 351
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSlidingLocaleIcon:Lcom/android/inputmethod/latin/LatinKeyboard$SlidingLocaleDrawable;

    if-nez v0, :cond_0

    .line 352
    new-instance v0, Lcom/android/inputmethod/latin/LatinKeyboard$SlidingLocaleDrawable;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpacePreviewIcon:Landroid/graphics/drawable/Drawable;

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    iget v2, v2, Landroid/inputmethodservice/Keyboard$Key;->width:I

    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpacePreviewIcon:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v3}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v3

    invoke-direct {v0, p0, v1, v2, v3}, Lcom/android/inputmethod/latin/LatinKeyboard$SlidingLocaleDrawable;-><init>(Lcom/android/inputmethod/latin/LatinKeyboard;Landroid/graphics/drawable/Drawable;II)V

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSlidingLocaleIcon:Lcom/android/inputmethod/latin/LatinKeyboard$SlidingLocaleDrawable;

    .line 354
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSlidingLocaleIcon:Lcom/android/inputmethod/latin/LatinKeyboard$SlidingLocaleDrawable;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    iget v1, v1, Landroid/inputmethodservice/Keyboard$Key;->width:I

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpacePreviewIcon:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v2}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v2

    invoke-virtual {v0, v4, v4, v1, v2}, Lcom/android/inputmethod/latin/LatinKeyboard$SlidingLocaleDrawable;->setBounds(IIII)V

    .line 356
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSlidingLocaleIcon:Lcom/android/inputmethod/latin/LatinKeyboard$SlidingLocaleDrawable;

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    .line 358
    :cond_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSlidingLocaleIcon:Lcom/android/inputmethod/latin/LatinKeyboard$SlidingLocaleDrawable;

    invoke-virtual {v0, p1}, Lcom/android/inputmethod/latin/LatinKeyboard$SlidingLocaleDrawable;->setDiff(I)V

    .line 359
    invoke-static {p1}, Ljava/lang/Math;->abs(I)I

    move-result v0

    const v1, 0x7fffffff

    if-ne v0, v1, :cond_1

    .line 360
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpacePreviewIcon:Landroid/graphics/drawable/Drawable;

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    .line 364
    :goto_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v0, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->invalidateSelf()V

    .line 365
    return-void

    .line 362
    :cond_1
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSlidingLocaleIcon:Lcom/android/inputmethod/latin/LatinKeyboard$SlidingLocaleDrawable;

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    goto :goto_0
.end method

.method private updateSpaceBarForLocale()V
    .locals 6

    .prologue
    const/4 v5, 0x1

    .line 273
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mLocale:Ljava/util/Locale;

    if-eqz v2, :cond_1

    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceSupportSwitch:Z

    if-eqz v2, :cond_1

    .line 275
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    iget v2, v2, Landroid/inputmethodservice/Keyboard$Key;->width:I

    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceIcon:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v3}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v3

    sget-object v4, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v2, v3, v4}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 277
    .local v0, buffer:Landroid/graphics/Bitmap;
    new-instance v1, Landroid/graphics/Canvas;

    invoke-direct {v1, v0}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 278
    .local v1, canvas:Landroid/graphics/Canvas;
    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v2

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v3

    const/16 v4, 0xff

    invoke-direct {p0, v1, v2, v3, v4}, Lcom/android/inputmethod/latin/LatinKeyboard;->drawSpaceBar(Landroid/graphics/Canvas;III)V

    .line 279
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    new-instance v3, Landroid/graphics/drawable/BitmapDrawable;

    iget-object v4, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mRes:Landroid/content/res/Resources;

    invoke-direct {v3, v4, v0}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/content/res/Resources;Landroid/graphics/Bitmap;)V

    iput-object v3, v2, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 280
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mLanguageSwitcher:Lcom/android/inputmethod/latin/LanguageSwitcher;

    invoke-virtual {v3}, Lcom/android/inputmethod/latin/LanguageSwitcher;->getLocaleCount()I

    move-result v3

    const/4 v4, 0x2

    if-ge v3, v4, :cond_0

    move v3, v5

    :goto_0
    iput-boolean v3, v2, Landroid/inputmethodservice/Keyboard$Key;->repeatable:Z

    .line 285
    .end local v0           #buffer:Landroid/graphics/Bitmap;
    .end local v1           #canvas:Landroid/graphics/Canvas;
    :goto_1
    return-void

    .line 280
    .restart local v0       #buffer:Landroid/graphics/Bitmap;
    .restart local v1       #canvas:Landroid/graphics/Canvas;
    :cond_0
    const/4 v3, 0x0

    goto :goto_0

    .line 282
    .end local v0           #buffer:Landroid/graphics/Bitmap;
    .end local v1           #canvas:Landroid/graphics/Canvas;
    :cond_1
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mRes:Landroid/content/res/Resources;

    const v4, 0x7f020074

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v3

    iput-object v3, v2, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 283
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-boolean v5, v2, Landroid/inputmethodservice/Keyboard$Key;->repeatable:Z

    goto :goto_1
.end method


# virtual methods
.method protected createKeyFromXml(Landroid/content/res/Resources;Landroid/inputmethodservice/Keyboard$Row;IILandroid/content/res/XmlResourceParser;)Landroid/inputmethodservice/Keyboard$Key;
    .locals 7
    .parameter "res"
    .parameter "parent"
    .parameter "x"
    .parameter "y"
    .parameter "parser"

    .prologue
    .line 130
    new-instance v0, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;

    move-object v1, p0

    move-object v2, p1

    move-object v3, p2

    move v4, p3

    move v5, p4

    move-object v6, p5

    invoke-direct/range {v0 .. v6}, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;-><init>(Lcom/android/inputmethod/latin/LatinKeyboard;Landroid/content/res/Resources;Landroid/inputmethodservice/Keyboard$Row;IILandroid/content/res/XmlResourceParser;)V

    .line 131
    .local v0, key:Landroid/inputmethodservice/Keyboard$Key;
    iget-object v1, v0, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;->codes:[I

    const/4 v2, 0x0

    aget v1, v1, v2

    sparse-switch v1, :sswitch_data_0

    .line 139
    :goto_0
    return-object v0

    .line 133
    :sswitch_0
    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    goto :goto_0

    .line 136
    :sswitch_1
    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    goto :goto_0

    .line 131
    :sswitch_data_0
    .sparse-switch
        0xa -> :sswitch_0
        0x20 -> :sswitch_1
    .end sparse-switch
.end method

.method enableShiftLock()V
    .locals 2

    .prologue
    .line 202
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboard;->getShiftKeyIndex()I

    move-result v0

    .line 203
    .local v0, index:I
    if-ltz v0, :cond_1

    .line 204
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboard;->getKeys()Ljava/util/List;

    move-result-object v1

    invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/inputmethodservice/Keyboard$Key;

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    .line 205
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    instance-of v1, v1, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;

    if-eqz v1, :cond_0

    .line 206
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    check-cast v1, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;->enableShiftLock()V

    .line 208
    :cond_0
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v1, v1, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mOldShiftIcon:Landroid/graphics/drawable/Drawable;

    .line 209
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v1, v1, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mOldShiftPreviewIcon:Landroid/graphics/drawable/Drawable;

    .line 211
    :cond_1
    return-void
.end method

.method public getExtension()I
    .locals 1

    .prologue
    .line 267
    iget v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mExtensionResId:I

    return v0
.end method

.method public getLanguageChangeDirection()I
    .locals 3

    .prologue
    .line 369
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mLanguageSwitcher:Lcom/android/inputmethod/latin/LanguageSwitcher;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LanguageSwitcher;->getLocaleCount()I

    move-result v0

    const/4 v1, 0x2

    if-lt v0, v1, :cond_0

    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceSupportSwitch:Z

    if-eqz v0, :cond_0

    iget v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceDragLastDiff:I

    invoke-static {v0}, Ljava/lang/Math;->abs(I)I

    move-result v0

    int-to-float v0, v0

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    iget v1, v1, Landroid/inputmethodservice/Keyboard$Key;->width:I

    int-to-float v1, v1

    const v2, 0x3f4ccccd

    mul-float/2addr v1, v2

    cmpg-float v0, v0, v1

    if-gez v0, :cond_1

    .line 371
    :cond_0
    const/4 v0, 0x0

    .line 373
    :goto_0
    return v0

    :cond_1
    iget v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceDragLastDiff:I

    if-lez v0, :cond_2

    const/4 v0, 0x1

    goto :goto_0

    :cond_2
    const/4 v0, -0x1

    goto :goto_0
.end method

.method public getNearestKeys(II)[I
    .locals 3
    .parameter "x"
    .parameter "y"

    .prologue
    .line 554
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mCurrentlyInSpace:Z

    if-eqz v0, :cond_0

    .line 555
    const/4 v0, 0x1

    new-array v0, v0, [I

    const/4 v1, 0x0

    iget v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKeyIndex:I

    aput v2, v0, v1

    .line 557
    :goto_0
    return-object v0

    :cond_0
    invoke-super {p0, p1, p2}, Landroid/inputmethodservice/Keyboard;->getNearestKeys(II)[I

    move-result-object v0

    goto :goto_0
.end method

.method isCurrentlyInSpace()Z
    .locals 1

    .prologue
    .line 394
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mCurrentlyInSpace:Z

    return v0
.end method

.method isInside(Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;II)Z
    .locals 17
    .parameter "key"
    .parameter "x"
    .parameter "y"

    .prologue
    .line 431
    move-object/from16 v0, p1

    iget-object v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;->codes:[I

    move-object v14, v0

    const/4 v15, 0x0

    aget v4, v14, v15

    .line 432
    .local v4, code:I
    const/4 v14, -0x1

    if-eq v4, v14, :cond_0

    const/4 v14, -0x5

    if-ne v4, v14, :cond_3

    .line 434
    :cond_0
    move-object/from16 v0, p1

    iget v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;->height:I

    move v14, v0

    div-int/lit8 v14, v14, 0xa

    sub-int p3, p3, v14

    .line 435
    const/4 v14, -0x1

    if-ne v4, v14, :cond_1

    move-object/from16 v0, p1

    iget v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;->width:I

    move v14, v0

    div-int/lit8 v14, v14, 0x6

    add-int p2, p2, v14

    .line 436
    :cond_1
    const/4 v14, -0x5

    if-ne v4, v14, :cond_2

    move-object/from16 v0, p1

    iget v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;->width:I

    move v14, v0

    div-int/lit8 v14, v14, 0x6

    sub-int p2, p2, v14

    .line 534
    :cond_2
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mCurrentlyInSpace:Z

    move v14, v0

    if-eqz v14, :cond_14

    const/4 v14, 0x0

    .line 536
    :goto_0
    return v14

    .line 437
    :cond_3
    const/16 v14, 0x20

    if-ne v4, v14, :cond_7

    .line 438
    const-string v14, "LatinKeyboard"

    new-instance v15, Ljava/lang/StringBuilder;

    invoke-direct {v15}, Ljava/lang/StringBuilder;-><init>()V

    const-string v16, "touch inside SPACE key, is it moved in?  "

    invoke-virtual/range {v15 .. v16}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    move-object/from16 v0, p0

    iget-boolean v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKeyMoveINFlag:Z

    move/from16 v16, v0

    invoke-virtual/range {v15 .. v16}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v15

    invoke-virtual {v15}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v15

    invoke-static {v14, v15}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 439
    sget v14, Lcom/android/inputmethod/latin/LatinKeyboard;->sSpacebarVerticalCorrection:I

    add-int p3, p3, v14

    .line 440
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mLanguageSwitcher:Lcom/android/inputmethod/latin/LanguageSwitcher;

    move-object v14, v0

    invoke-virtual {v14}, Lcom/android/inputmethod/latin/LanguageSwitcher;->getLocaleCount()I

    move-result v14

    const/4 v15, 0x1

    if-le v14, v15, :cond_2

    .line 441
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mCurrentlyInSpace:Z

    move v14, v0

    if-eqz v14, :cond_5

    .line 442
    move-object/from16 v0, p0

    iget v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceDragStartX:I

    move v14, v0

    sub-int v5, p2, v14

    .line 443
    .local v5, diff:I
    move-object/from16 v0, p0

    iget v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceDragLastDiff:I

    move v14, v0

    sub-int v14, v5, v14

    invoke-static {v14}, Ljava/lang/Math;->abs(I)I

    move-result v14

    if-lez v14, :cond_4

    .line 444
    move-object/from16 v0, p0

    move v1, v5

    invoke-direct {v0, v1}, Lcom/android/inputmethod/latin/LatinKeyboard;->updateLocaleDrag(I)V

    .line 446
    :cond_4
    move v0, v5

    move-object/from16 v1, p0

    iput v0, v1, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceDragLastDiff:I

    .line 447
    const/4 v14, 0x1

    goto :goto_0

    .line 448
    .end local v5           #diff:I
    :cond_5
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKeyMoveINFlag:Z

    move v14, v0

    if-eqz v14, :cond_2

    .line 449
    invoke-virtual/range {p1 .. p3}, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;->isInsideSuper(II)Z

    move-result v9

    .line 450
    .local v9, insideSpace:Z
    if-eqz v9, :cond_6

    .line 451
    const/4 v14, 0x1

    move v0, v14

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/android/inputmethod/latin/LatinKeyboard;->mCurrentlyInSpace:Z

    .line 452
    move/from16 v0, p2

    move-object/from16 v1, p0

    iput v0, v1, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceDragStartX:I

    .line 453
    const/4 v14, 0x0

    move-object/from16 v0, p0

    move v1, v14

    invoke-direct {v0, v1}, Lcom/android/inputmethod/latin/LatinKeyboard;->updateLocaleDrag(I)V

    :cond_6
    move v14, v9

    .line 455
    goto :goto_0

    .line 458
    .end local v9           #insideSpace:Z
    :cond_7
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetterFrequencies:[I

    move-object v14, v0

    if-eqz v14, :cond_2

    .line 460
    move-object/from16 v0, p0

    iget v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetterX:I

    move v14, v0

    move v0, v14

    move/from16 v1, p2

    if-ne v0, v1, :cond_8

    move-object/from16 v0, p0

    iget v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetterY:I

    move v14, v0

    move v0, v14

    move/from16 v1, p3

    if-eq v0, v1, :cond_9

    .line 461
    :cond_8
    const/4 v14, 0x0

    move v0, v14

    move-object/from16 v1, p0

    iput v0, v1, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetter:I

    .line 462
    const v14, 0x7fffffff

    move v0, v14

    move-object/from16 v1, p0

    iput v0, v1, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefDistance:I

    .line 465
    :cond_9
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetterFrequencies:[I

    move-object v13, v0

    .line 466
    .local v13, pref:[I
    move-object/from16 v0, p0

    iget v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetter:I

    move v14, v0

    if-lez v14, :cond_b

    .line 471
    move-object/from16 v0, p0

    iget v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetter:I

    move v14, v0

    if-ne v14, v4, :cond_a

    const/4 v14, 0x1

    goto/16 :goto_0

    :cond_a
    const/4 v14, 0x0

    goto/16 :goto_0

    .line 473
    :cond_b
    invoke-virtual/range {p1 .. p3}, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;->isInsideSuper(II)Z

    move-result v8

    .line 474
    .local v8, inside:Z
    move-object/from16 v0, p0

    move/from16 v1, p2

    move/from16 v2, p3

    invoke-virtual {v0, v1, v2}, Lcom/android/inputmethod/latin/LatinKeyboard;->getNearestKeys(II)[I

    move-result-object v11

    .line 475
    .local v11, nearby:[I
    invoke-virtual/range {p0 .. p0}, Lcom/android/inputmethod/latin/LatinKeyboard;->getKeys()Ljava/util/List;

    move-result-object v12

    .line 476
    .local v12, nearbyKeys:Ljava/util/List;,"Ljava/util/List<Landroid/inputmethodservice/Keyboard$Key;>;"
    if-eqz v8, :cond_f

    .line 478
    move-object/from16 v0, p0

    move v1, v4

    move-object v2, v13

    invoke-direct {v0, v1, v2}, Lcom/android/inputmethod/latin/LatinKeyboard;->inPrefList(I[I)Z

    move-result v14

    if-eqz v14, :cond_f

    .line 480
    move v0, v4

    move-object/from16 v1, p0

    iput v0, v1, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetter:I

    .line 481
    move/from16 v0, p2

    move-object/from16 v1, p0

    iput v0, v1, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetterX:I

    .line 482
    move/from16 v0, p3

    move-object/from16 v1, p0

    iput v0, v1, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetterY:I

    .line 483
    const/4 v7, 0x0

    .local v7, i:I
    :goto_1
    array-length v14, v11

    if-ge v7, v14, :cond_c

    .line 484
    aget v14, v11, v7

    invoke-interface {v12, v14}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Landroid/inputmethodservice/Keyboard$Key;

    .line 485
    .local v10, k:Landroid/inputmethodservice/Keyboard$Key;
    move-object v0, v10

    move-object/from16 v1, p1

    if-eq v0, v1, :cond_d

    iget-object v14, v10, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    const/4 v15, 0x0

    aget v14, v14, v15

    move-object/from16 v0, p0

    move v1, v14

    move-object v2, v13

    invoke-direct {v0, v1, v2}, Lcom/android/inputmethod/latin/LatinKeyboard;->inPrefList(I[I)Z

    move-result v14

    if-eqz v14, :cond_d

    .line 486
    move-object/from16 v0, p0

    move-object v1, v10

    move/from16 v2, p2

    move/from16 v3, p3

    invoke-direct {v0, v1, v2, v3}, Lcom/android/inputmethod/latin/LatinKeyboard;->distanceFrom(Landroid/inputmethodservice/Keyboard$Key;II)I

    move-result v6

    .line 487
    .local v6, dist:I
    iget v14, v10, Landroid/inputmethodservice/Keyboard$Key;->width:I

    int-to-float v14, v14

    const v15, 0x3f333333

    mul-float/2addr v14, v15

    float-to-int v14, v14

    if-ge v6, v14, :cond_d

    iget-object v14, v10, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    const/4 v15, 0x0

    aget v14, v14, v15

    aget v14, v13, v14

    move-object/from16 v0, p0

    iget v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetter:I

    move v15, v0

    aget v15, v13, v15

    mul-int/lit8 v15, v15, 0x3

    if-le v14, v15, :cond_d

    .line 489
    iget-object v14, v10, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    const/4 v15, 0x0

    aget v14, v14, v15

    move v0, v14

    move-object/from16 v1, p0

    iput v0, v1, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetter:I

    .line 490
    move v0, v6

    move-object/from16 v1, p0

    iput v0, v1, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefDistance:I

    .line 499
    .end local v6           #dist:I
    .end local v10           #k:Landroid/inputmethodservice/Keyboard$Key;
    :cond_c
    move-object/from16 v0, p0

    iget v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetter:I

    move v14, v0

    if-ne v14, v4, :cond_e

    const/4 v14, 0x1

    goto/16 :goto_0

    .line 483
    .restart local v10       #k:Landroid/inputmethodservice/Keyboard$Key;
    :cond_d
    add-int/lit8 v7, v7, 0x1

    goto :goto_1

    .line 499
    .end local v10           #k:Landroid/inputmethodservice/Keyboard$Key;
    :cond_e
    const/4 v14, 0x0

    goto/16 :goto_0

    .line 511
    .end local v7           #i:I
    :cond_f
    const/4 v7, 0x0

    .restart local v7       #i:I
    :goto_2
    array-length v14, v11

    if-ge v7, v14, :cond_11

    .line 512
    aget v14, v11, v7

    invoke-interface {v12, v14}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Landroid/inputmethodservice/Keyboard$Key;

    .line 513
    .restart local v10       #k:Landroid/inputmethodservice/Keyboard$Key;
    iget-object v14, v10, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    const/4 v15, 0x0

    aget v14, v14, v15

    move-object/from16 v0, p0

    move v1, v14

    move-object v2, v13

    invoke-direct {v0, v1, v2}, Lcom/android/inputmethod/latin/LatinKeyboard;->inPrefList(I[I)Z

    move-result v14

    if-eqz v14, :cond_10

    .line 514
    move-object/from16 v0, p0

    move-object v1, v10

    move/from16 v2, p2

    move/from16 v3, p3

    invoke-direct {v0, v1, v2, v3}, Lcom/android/inputmethod/latin/LatinKeyboard;->distanceFrom(Landroid/inputmethodservice/Keyboard$Key;II)I

    move-result v6

    .line 515
    .restart local v6       #dist:I
    iget v14, v10, Landroid/inputmethodservice/Keyboard$Key;->width:I

    int-to-float v14, v14

    const v15, 0x3f59999a

    mul-float/2addr v14, v15

    float-to-int v14, v14

    if-ge v6, v14, :cond_10

    move-object/from16 v0, p0

    iget v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefDistance:I

    move v14, v0

    if-ge v6, v14, :cond_10

    .line 517
    iget-object v14, v10, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    const/4 v15, 0x0

    aget v14, v14, v15

    move v0, v14

    move-object/from16 v1, p0

    iput v0, v1, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetter:I

    .line 518
    move/from16 v0, p2

    move-object/from16 v1, p0

    iput v0, v1, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetterX:I

    .line 519
    move/from16 v0, p3

    move-object/from16 v1, p0

    iput v0, v1, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetterY:I

    .line 520
    move v0, v6

    move-object/from16 v1, p0

    iput v0, v1, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefDistance:I

    .line 511
    .end local v6           #dist:I
    :cond_10
    add-int/lit8 v7, v7, 0x1

    goto :goto_2

    .line 525
    .end local v10           #k:Landroid/inputmethodservice/Keyboard$Key;
    :cond_11
    move-object/from16 v0, p0

    iget v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetter:I

    move v14, v0

    if-nez v14, :cond_12

    move v14, v8

    .line 526
    goto/16 :goto_0

    .line 528
    :cond_12
    move-object/from16 v0, p0

    iget v0, v0, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetter:I

    move v14, v0

    if-ne v14, v4, :cond_13

    const/4 v14, 0x1

    goto/16 :goto_0

    :cond_13
    const/4 v14, 0x0

    goto/16 :goto_0

    .line 536
    .end local v7           #i:I
    .end local v8           #inside:Z
    .end local v11           #nearby:[I
    .end local v12           #nearbyKeys:Ljava/util/List;,"Ljava/util/List<Landroid/inputmethodservice/Keyboard$Key;>;"
    .end local v13           #pref:[I
    :cond_14
    invoke-virtual/range {p1 .. p3}, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;->isInsideSuper(II)Z

    move-result v14

    goto/16 :goto_0
.end method

.method isShiftLocked()Z
    .locals 2

    .prologue
    .line 228
    iget v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public isShifted()Z
    .locals 1

    .prologue
    .line 255
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    if-eqz v0, :cond_1

    .line 256
    iget v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    .line 258
    :goto_0
    return v0

    .line 256
    :cond_0
    const/4 v0, 0x0

    goto :goto_0

    .line 258
    :cond_1
    invoke-super {p0}, Landroid/inputmethodservice/Keyboard;->isShifted()Z

    move-result v0

    goto :goto_0
.end method

.method keyReleased()V
    .locals 3

    .prologue
    const v2, 0x7fffffff

    const/4 v1, 0x0

    .line 403
    iput-boolean v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mCurrentlyInSpace:Z

    .line 404
    iput v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceDragLastDiff:I

    .line 405
    iput v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetter:I

    .line 406
    iput v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetterX:I

    .line 407
    iput v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetterY:I

    .line 408
    iput v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefDistance:I

    .line 409
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKey:Landroid/inputmethodservice/Keyboard$Key;

    if-eqz v0, :cond_0

    .line 410
    invoke-direct {p0, v2}, Lcom/android/inputmethod/latin/LatinKeyboard;->updateLocaleDrag(I)V

    .line 412
    :cond_0
    iput-boolean v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKeyMoveINFlag:Z

    .line 413
    return-void
.end method

.method public setExtension(I)V
    .locals 0
    .parameter "resId"

    .prologue
    .line 263
    iput p1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mExtensionResId:I

    .line 264
    return-void
.end method

.method setImeOptions(Landroid/content/res/Resources;II)V
    .locals 4
    .parameter "res"
    .parameter "mode"
    .parameter "options"

    .prologue
    const/4 v3, 0x0

    const/4 v2, 0x0

    .line 143
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    if-eqz v0, :cond_0

    .line 145
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->popupCharacters:Ljava/lang/CharSequence;

    .line 146
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput v3, v0, Landroid/inputmethodservice/Keyboard$Key;->popupResId:I

    .line 147
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->text:Ljava/lang/CharSequence;

    .line 148
    const v0, 0x400000ff

    and-int/2addr v0, p3

    packed-switch v0, :pswitch_data_0

    .line 177
    const/4 v0, 0x6

    if-ne p2, v0, :cond_1

    .line 178
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 179
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    .line 180
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const-string v1, ":-)"

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->label:Ljava/lang/CharSequence;

    .line 181
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const-string v1, ":-) "

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->text:Ljava/lang/CharSequence;

    .line 182
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f04000d

    iput v1, v0, Landroid/inputmethodservice/Keyboard$Key;->popupResId:I

    .line 193
    :goto_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v0, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    if-eqz v0, :cond_0

    .line 194
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v0, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v1, v1, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v1

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v2, v2, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v2}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v2

    invoke-virtual {v0, v3, v3, v1, v2}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 199
    :cond_0
    return-void

    .line 150
    :pswitch_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    .line 151
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 152
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f0a0048

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->label:Ljava/lang/CharSequence;

    goto :goto_0

    .line 155
    :pswitch_1
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    .line 156
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 157
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f0a0049

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->label:Ljava/lang/CharSequence;

    goto :goto_0

    .line 160
    :pswitch_2
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    .line 161
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 162
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f0a004a

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->label:Ljava/lang/CharSequence;

    goto :goto_0

    .line 165
    :pswitch_3
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f02005b

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    .line 167
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f020071

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 169
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->label:Ljava/lang/CharSequence;

    goto :goto_0

    .line 172
    :pswitch_4
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    .line 173
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 174
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f0a004b

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->label:Ljava/lang/CharSequence;

    goto/16 :goto_0

    .line 184
    :cond_1
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f02005a

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    .line 186
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f020070

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 188
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->label:Ljava/lang/CharSequence;

    goto/16 :goto_0

    .line 148
    nop

    :pswitch_data_0
    .packed-switch 0x2
        :pswitch_0
        :pswitch_3
        :pswitch_4
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method public setLanguageSwitcher(Lcom/android/inputmethod/latin/LanguageSwitcher;)V
    .locals 3
    .parameter "switcher"

    .prologue
    .line 377
    iput-object p1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mLanguageSwitcher:Lcom/android/inputmethod/latin/LanguageSwitcher;

    .line 378
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mLanguageSwitcher:Lcom/android/inputmethod/latin/LanguageSwitcher;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/LanguageSwitcher;->getLocaleCount()I

    move-result v1

    if-lez v1, :cond_1

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mLanguageSwitcher:Lcom/android/inputmethod/latin/LanguageSwitcher;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/LanguageSwitcher;->getInputLocale()Ljava/util/Locale;

    move-result-object v1

    move-object v0, v1

    .line 382
    .local v0, locale:Ljava/util/Locale;
    :goto_0
    if-eqz v0, :cond_0

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mLanguageSwitcher:Lcom/android/inputmethod/latin/LanguageSwitcher;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/LanguageSwitcher;->getLocaleCount()I

    move-result v1

    const/4 v2, 0x1

    if-ne v1, v2, :cond_0

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mLanguageSwitcher:Lcom/android/inputmethod/latin/LanguageSwitcher;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/LanguageSwitcher;->getSystemLocale()Ljava/util/Locale;

    move-result-object v1

    invoke-virtual {v1}, Ljava/util/Locale;->getLanguage()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0}, Ljava/util/Locale;->getLanguage()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 386
    const/4 v0, 0x0

    .line 388
    :cond_0
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mLocale:Ljava/util/Locale;

    if-eqz v1, :cond_2

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mLocale:Ljava/util/Locale;

    invoke-virtual {v1, v0}, Ljava/util/Locale;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_2

    .line 391
    :goto_1
    return-void

    .line 378
    .end local v0           #locale:Ljava/util/Locale;
    :cond_1
    const/4 v1, 0x0

    move-object v0, v1

    goto :goto_0

    .line 389
    .restart local v0       #locale:Ljava/util/Locale;
    :cond_2
    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mLocale:Ljava/util/Locale;

    .line 390
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinKeyboard;->updateSpaceBarForLocale()V

    goto :goto_1
.end method

.method setPreferredLetters([I)V
    .locals 1
    .parameter "frequencies"

    .prologue
    .line 398
    iput-object p1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetterFrequencies:[I

    .line 399
    const/4 v0, 0x0

    iput v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mPrefLetter:I

    .line 400
    return-void
.end method

.method setShiftLocked(Z)V
    .locals 3
    .parameter "shiftLocked"

    .prologue
    const/4 v2, 0x1

    .line 214
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    if-eqz v0, :cond_0

    .line 215
    if-eqz p1, :cond_1

    .line 216
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-boolean v2, v0, Landroid/inputmethodservice/Keyboard$Key;->on:Z

    .line 217
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftLockIcon:Landroid/graphics/drawable/Drawable;

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 218
    const/4 v0, 0x2

    iput v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    .line 225
    :cond_0
    :goto_0
    return-void

    .line 220
    :cond_1
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    const/4 v1, 0x0

    iput-boolean v1, v0, Landroid/inputmethodservice/Keyboard$Key;->on:Z

    .line 221
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftLockIcon:Landroid/graphics/drawable/Drawable;

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 222
    iput v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    goto :goto_0
.end method

.method public setShifted(Z)Z
    .locals 4
    .parameter "shiftState"

    .prologue
    const/4 v3, 0x1

    const/4 v2, 0x0

    .line 233
    const/4 v0, 0x0

    .line 234
    .local v0, shiftChanged:Z
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    if-eqz v1, :cond_4

    .line 235
    if-nez p1, :cond_2

    .line 236
    iget v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    if-eqz v1, :cond_1

    move v0, v3

    .line 237
    :goto_0
    iput v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    .line 238
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-boolean v2, v1, Landroid/inputmethodservice/Keyboard$Key;->on:Z

    .line 239
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mOldShiftIcon:Landroid/graphics/drawable/Drawable;

    iput-object v2, v1, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    :cond_0
    :goto_1
    move v1, v0

    .line 250
    :goto_2
    return v1

    :cond_1
    move v0, v2

    .line 236
    goto :goto_0

    .line 241
    :cond_2
    iget v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    if-nez v1, :cond_0

    .line 242
    iget v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    if-nez v1, :cond_3

    move v0, v3

    .line 243
    :goto_3
    iput v3, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    .line 244
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftLockIcon:Landroid/graphics/drawable/Drawable;

    iput-object v2, v1, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    goto :goto_1

    :cond_3
    move v0, v2

    .line 242
    goto :goto_3

    .line 248
    :cond_4
    invoke-super {p0, p1}, Landroid/inputmethodservice/Keyboard;->setShifted(Z)Z

    move-result v1

    goto :goto_2
.end method

.method public setSpaceKeyMoveINFlag(Z)V
    .locals 0
    .parameter "flag"

    .prologue
    .line 422
    iput-boolean p1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mSpaceKeyMoveINFlag:Z

    .line 423
    return-void
.end method
